<template>
	<view class="container">
		<!--头部start-->
		<view class="s_tab">
			<u-status-bar></u-status-bar>
			<view class="ds_tab">
				<view class="left">
					<text :class="navIndex==0?'active':''" @click="checkIndex(0)">运行中</text>
					<text :class="navIndex==1?'active':''" @click="checkIndex(1)">已结束</text>
				</view>
				<view class="right">切换排序<image src="/static/images/g_img8.png" mode="widthFix"></image></view>
			</view>
		</view>
		<!--头部end-->
		
		<!--运行中start-->
		<view v-show="navIndex==0">
			<startedRun></startedRun>
		</view>
		<!--运行中end-->
		
		<!--已结算start-->
		<view v-show="navIndex==1">
			<startedOver></startedOver>
		</view>
		<!--已结算end-->
		
	</view>
</template>

<script>
	import startedOver from './started_over.vue'
	import startedRun from './satrted_running.vue'
	export default {
	    components: {
	        /***** mescroll S *****/
	        //注册组件
	        startedOver,startedRun
	        /***** mescroll E *****/
	    },
		data(){
			return{
				navIndex: 0,
			}
		},
		methods:{
			checkIndex(index) {
				console.log(index)
				this.navIndex = index;
			},
		}
	}
</script>

<style lang="scss">
	@import url("../../common/style.scss");
	@import url("../team/team.scss");
	@import url("machine.scss");
	.container{
		padding-top: 190rpx;
	}
</style>